import request from '@/utils/request';
import { DEFAULT_URL_SYSTEM_MANAGE } from '@/constants';

/**
 * 角色菜单管理-查询角色菜单列表
 */
export async function queryRolePermission({ roleId }) {
  return request(`${DEFAULT_URL_SYSTEM_MANAGE}/rolepermission/role/${roleId}`);
}

/**
 * 角色菜单管理-更新角色菜单
 */
export async function updateRolePermission({ roleId, option }) {
  return request(`${DEFAULT_URL_SYSTEM_MANAGE}/role/${roleId}/allot`, option);
}
